<?php
if(!isset($_SESSION)) 
    { 
       @session_start(); 
    } 
if (!$_SESSION['logged_in']) {
   header("Location: login");
   exit;
}
?>